package com.ece.core.editors.config;

import java.security.Timestamp;

import com.ece.core.config.State;

/**
 * This bean represents a particular comment in file.
 * 
 * @author Senthu Sivasambu, http://ca.linkedin.com/in/sivasambu
 * 
 */
public class Comment {

    /* state of this comment */
    private State state;

    /* actual path of this comment - pointing to a file */
    private String path; // TODO this may not belong here

    /* line number of the change */
    private int lineNumber;

    /* offset of the change from the start of the line */
    private int offset;

    /* actual comment data */
    private String data;

    /* timestamp associated with this comment - required for sequencing */
    // TODO - then again the best way is to generate it on the serverside
    private Timestamp timeStamp;

    public Comment(Timestamp timeStamp, State state, String path,
	    int lineNumber, int offset, String data) {
	this.timeStamp = timeStamp;
	this.state = state;
	this.path = path;
	this.lineNumber = lineNumber;
	this.offset = offset;
	this.data = data;
    }

    public State getState() {
	return state;
    }

    public void setState(State state) {
	this.state = state;
    }

    public String getPath() {
	return path;
    }

    public void setPath(String path) {
	this.path = path;
    }

    public int getLineNumber() {
	return lineNumber;
    }

    public void setLineNumber(int lineNumber) {
	this.lineNumber = lineNumber;
    }

    public int getOffset() {
	return offset;
    }

    public void setOffset(int offset) {
	this.offset = offset;
    }

    public String getData() {
	return data;
    }

    public void setData(String data) {
	this.data = data;
    }

    public Timestamp getTimeStamp() {
	return timeStamp;
    }

    public void setTimeStamp(Timestamp timeStamp) {
	this.timeStamp = timeStamp;
    }

}
